#ifndef __Location_H__
#define __Location_H__
#include <string>
#include <list>
#include <vector>
#include <map>
#include <cstring>
#include <stdint.h>

//#include "other_idl.h"

enum LocationResult {
		LOCATION_SUCCESS,
		LOCATION_FAIL,
		LOCATION_NOT_EXIST_USER,
		LOCATION_NOT_EXIST_TARGET_USER,
}; // LocationResult
struct LocationResult_Serializer {
	static bool Store(char** _buf_, const LocationResult& obj) { 
		(*(LocationResult*)(*_buf_)) = obj;	(*_buf_) += sizeof(LocationResult);
		return true;
	}
	static bool Load(LocationResult& obj, const char** _buf_, size_t& nSize) { 
		if(sizeof(LocationResult) > nSize) { return false; }		std::memcpy(&obj, *_buf_, sizeof(LocationResult));		(*_buf_) += sizeof(LocationResult); nSize -= sizeof(LocationResult);
		return true;
	}
	static int32_t Size(const LocationResult& obj) { return sizeof(LocationResult); }
};
struct LocationOpenAck {
	enum { MSG_ID = 1 }; 
	LocationOpenAck()	{
	}
	int32_t Size() const {
		int32_t nSize = 0;
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		return true;
	}
}; //LocationOpenAck
struct LocationOpenAck_Serializer {
	static bool Store(char** _buf_, const LocationOpenAck& obj) { return obj.Store(_buf_); }
	static bool Load(LocationOpenAck& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const LocationOpenAck& obj) { return obj.Size(); }
};
struct LocationCloseAck {
	enum { MSG_ID = 2 }; 
	LocationCloseAck()	{
	}
	int32_t Size() const {
		int32_t nSize = 0;
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		return true;
	}
}; //LocationCloseAck
struct LocationCloseAck_Serializer {
	static bool Store(char** _buf_, const LocationCloseAck& obj) { return obj.Store(_buf_); }
	static bool Load(LocationCloseAck& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const LocationCloseAck& obj) { return obj.Size(); }
};
struct RegistSyn {
	enum { MSG_ID = 8001 }; 
	uint32_t	seq;
	RegistSyn()	{
		seq = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		return true;
	}
}; //RegistSyn
struct RegistSyn_Serializer {
	static bool Store(char** _buf_, const RegistSyn& obj) { return obj.Store(_buf_); }
	static bool Load(RegistSyn& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const RegistSyn& obj) { return obj.Size(); }
};
struct RegistAck {
	enum { MSG_ID = 8002 }; 
	uint32_t	seq;
	LocationResult	result;
	std::string	strError;
	RegistAck()	{
		seq = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += LocationResult_Serializer::Size(result);
		nSize += sizeof(uint32_t); nSize += strError.length();
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		if(false == LocationResult_Serializer::Store(_buf_, result)) { return false; }
		size_t strError_size = strError.length();
		std::memcpy(*_buf_, &strError_size, sizeof(int32_t)); (*_buf_) += sizeof(int32_t);
		std::memcpy(*_buf_, strError.c_str(), strError.length()); (*_buf_) += strError.length();
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(false == LocationResult_Serializer::Load(result, _buf_, nSize)) { return false; }
		if(sizeof(int32_t) > nSize) { return false; }
		uint32_t strError_length = 0; std::memcpy(&strError_length, *_buf_, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(nSize < strError_length) { return false; }
		strError.assign((char*)*_buf_, strError_length); (*_buf_) += strError_length; nSize -= strError_length;
		return true;
	}
}; //RegistAck
struct RegistAck_Serializer {
	static bool Store(char** _buf_, const RegistAck& obj) { return obj.Store(_buf_); }
	static bool Load(RegistAck& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const RegistAck& obj) { return obj.Size(); }
};
struct UnRegistSyn {
	enum { MSG_ID = 8003 }; 
	uint32_t	seq;
	UnRegistSyn()	{
		seq = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		return true;
	}
}; //UnRegistSyn
struct UnRegistSyn_Serializer {
	static bool Store(char** _buf_, const UnRegistSyn& obj) { return obj.Store(_buf_); }
	static bool Load(UnRegistSyn& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const UnRegistSyn& obj) { return obj.Size(); }
};
struct UnRegistAck {
	enum { MSG_ID = 8004 }; 
	uint32_t	seq;
	LocationResult	result;
	std::string	strError;
	UnRegistAck()	{
		seq = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += LocationResult_Serializer::Size(result);
		nSize += sizeof(uint32_t); nSize += strError.length();
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		if(false == LocationResult_Serializer::Store(_buf_, result)) { return false; }
		size_t strError_size = strError.length();
		std::memcpy(*_buf_, &strError_size, sizeof(int32_t)); (*_buf_) += sizeof(int32_t);
		std::memcpy(*_buf_, strError.c_str(), strError.length()); (*_buf_) += strError.length();
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(false == LocationResult_Serializer::Load(result, _buf_, nSize)) { return false; }
		if(sizeof(int32_t) > nSize) { return false; }
		uint32_t strError_length = 0; std::memcpy(&strError_length, *_buf_, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(nSize < strError_length) { return false; }
		strError.assign((char*)*_buf_, strError_length); (*_buf_) += strError_length; nSize -= strError_length;
		return true;
	}
}; //UnRegistAck
struct UnRegistAck_Serializer {
	static bool Store(char** _buf_, const UnRegistAck& obj) { return obj.Store(_buf_); }
	static bool Load(UnRegistAck& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const UnRegistAck& obj) { return obj.Size(); }
};
struct KickUser {
	enum { MSG_ID = 8005 }; 
	uint32_t	seq;
	KickUser()	{
		seq = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		return true;
	}
}; //KickUser
struct KickUser_Serializer {
	static bool Store(char** _buf_, const KickUser& obj) { return obj.Store(_buf_); }
	static bool Load(KickUser& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const KickUser& obj) { return obj.Size(); }
};
struct ChatSyn {
	enum { MSG_ID = 8006 }; 
	uint32_t	type;
	uint32_t	sender_seq;
	uint32_t	receiver_seq;
	std::string	sender_nick;
	std::string	msgs;
	ChatSyn()	{
		type = 0;
		sender_seq = 0;
		receiver_seq = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t); nSize += sender_nick.length();
		nSize += sizeof(uint32_t); nSize += msgs.length();
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &type, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &sender_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &receiver_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		size_t sender_nick_size = sender_nick.length();
		std::memcpy(*_buf_, &sender_nick_size, sizeof(int32_t)); (*_buf_) += sizeof(int32_t);
		std::memcpy(*_buf_, sender_nick.c_str(), sender_nick.length()); (*_buf_) += sender_nick.length();
		size_t msgs_size = msgs.length();
		std::memcpy(*_buf_, &msgs_size, sizeof(int32_t)); (*_buf_) += sizeof(int32_t);
		std::memcpy(*_buf_, msgs.c_str(), msgs.length()); (*_buf_) += msgs.length();
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&type, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&sender_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&receiver_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(int32_t) > nSize) { return false; }
		uint32_t sender_nick_length = 0; std::memcpy(&sender_nick_length, *_buf_, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(nSize < sender_nick_length) { return false; }
		sender_nick.assign((char*)*_buf_, sender_nick_length); (*_buf_) += sender_nick_length; nSize -= sender_nick_length;
		if(sizeof(int32_t) > nSize) { return false; }
		uint32_t msgs_length = 0; std::memcpy(&msgs_length, *_buf_, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(nSize < msgs_length) { return false; }
		msgs.assign((char*)*_buf_, msgs_length); (*_buf_) += msgs_length; nSize -= msgs_length;
		return true;
	}
}; //ChatSyn
struct ChatSyn_Serializer {
	static bool Store(char** _buf_, const ChatSyn& obj) { return obj.Store(_buf_); }
	static bool Load(ChatSyn& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const ChatSyn& obj) { return obj.Size(); }
};
struct ChatAck {
	enum { MSG_ID = 8007 }; 
	uint32_t	type;
	uint32_t	sender_seq;
	uint32_t	receiver_seq;
	LocationResult	result;
	ChatAck()	{
		type = 0;
		sender_seq = 0;
		receiver_seq = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		nSize += LocationResult_Serializer::Size(result);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &type, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &sender_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &receiver_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		if(false == LocationResult_Serializer::Store(_buf_, result)) { return false; }
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&type, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&sender_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&receiver_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(false == LocationResult_Serializer::Load(result, _buf_, nSize)) { return false; }
		return true;
	}
}; //ChatAck
struct ChatAck_Serializer {
	static bool Store(char** _buf_, const ChatAck& obj) { return obj.Store(_buf_); }
	static bool Load(ChatAck& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const ChatAck& obj) { return obj.Size(); }
};
struct RecallSyn {
	enum { MSG_ID = 8008 }; 
	uint32_t	sender_seq;
	uint32_t	receiver_seq;
	std::string	ip;
	uint32_t	port;
	uint32_t	server_id;
	uint32_t	channel_id;
	RecallSyn()	{
		sender_seq = 0;
		receiver_seq = 0;
		port = 0;
		server_id = 0;
		channel_id = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t); nSize += ip.length();
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &sender_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &receiver_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		size_t ip_size = ip.length();
		std::memcpy(*_buf_, &ip_size, sizeof(int32_t)); (*_buf_) += sizeof(int32_t);
		std::memcpy(*_buf_, ip.c_str(), ip.length()); (*_buf_) += ip.length();
		std::memcpy(*_buf_, &port, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &server_id, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &channel_id, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&sender_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&receiver_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(int32_t) > nSize) { return false; }
		uint32_t ip_length = 0; std::memcpy(&ip_length, *_buf_, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(nSize < ip_length) { return false; }
		ip.assign((char*)*_buf_, ip_length); (*_buf_) += ip_length; nSize -= ip_length;
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&port, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&server_id, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&channel_id, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		return true;
	}
}; //RecallSyn
struct RecallSyn_Serializer {
	static bool Store(char** _buf_, const RecallSyn& obj) { return obj.Store(_buf_); }
	static bool Load(RecallSyn& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const RecallSyn& obj) { return obj.Size(); }
};
struct RecallAck {
	enum { MSG_ID = 8009 }; 
	uint32_t	sender_seq;
	uint32_t	receiver_seq;
	uint16_t	is_accept;
	LocationResult	result;
	RecallAck()	{
		sender_seq = 0;
		receiver_seq = 0;
		is_accept = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint16_t);
		nSize += LocationResult_Serializer::Size(result);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &sender_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &receiver_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &is_accept, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		if(false == LocationResult_Serializer::Store(_buf_, result)) { return false; }
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&sender_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&receiver_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&is_accept, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(false == LocationResult_Serializer::Load(result, _buf_, nSize)) { return false; }
		return true;
	}
}; //RecallAck
struct RecallAck_Serializer {
	static bool Store(char** _buf_, const RecallAck& obj) { return obj.Store(_buf_); }
	static bool Load(RecallAck& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const RecallAck& obj) { return obj.Size(); }
};
struct TradeItemSoldoutSyn {
	enum { MSG_ID = 8010 }; 
	uint32_t	buyer_characterseq;
	uint32_t	seller_userseq;
	uint64_t	item_trade_seq;
	int32_t	item_class_type;
	uint32_t	item_sheet_type;
	TradeItemSoldoutSyn()	{
		buyer_characterseq = 0;
		seller_userseq = 0;
		item_trade_seq = 0;
		item_class_type = 0;
		item_sheet_type = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint64_t);
		nSize += sizeof(int32_t);
		nSize += sizeof(uint32_t);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &buyer_characterseq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &seller_userseq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &item_trade_seq, sizeof(uint64_t)); (*_buf_) += sizeof(uint64_t);
		std::memcpy(*_buf_, &item_class_type, sizeof(int32_t)); (*_buf_) += sizeof(int32_t);
		std::memcpy(*_buf_, &item_sheet_type, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&buyer_characterseq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seller_userseq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint64_t) > nSize) { return false; }	std::memcpy(&item_trade_seq, *_buf_, sizeof(uint64_t));	(*_buf_) += sizeof(uint64_t); nSize -= sizeof(uint64_t);
		if(sizeof(int32_t) > nSize) { return false; }	std::memcpy(&item_class_type, *_buf_, sizeof(int32_t));	(*_buf_) += sizeof(int32_t); nSize -= sizeof(int32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&item_sheet_type, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		return true;
	}
}; //TradeItemSoldoutSyn
struct TradeItemSoldoutSyn_Serializer {
	static bool Store(char** _buf_, const TradeItemSoldoutSyn& obj) { return obj.Store(_buf_); }
	static bool Load(TradeItemSoldoutSyn& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const TradeItemSoldoutSyn& obj) { return obj.Size(); }
};
struct SetMainCharacterInfoSyn {
	enum { MSG_ID = 8011 }; 
	uint32_t	seq;
	uint16_t	level;
	uint16_t	class_type;
	uint16_t	head;
	uint16_t	armor;
	uint16_t	weapon;
	uint16_t	side_hand;
	uint16_t	effect;
	int16_t	pet_tid;
	uint16_t	profile_opened;
	uint16_t	gender;
	uint16_t	gender_open;
	uint16_t	birthday_open;
	std::string	strBirthday;
	SetMainCharacterInfoSyn()	{
		seq = 0;
		level = 0;
		class_type = 0;
		head = 0;
		armor = 0;
		weapon = 0;
		side_hand = 0;
		effect = 0;
		pet_tid = 0;
		profile_opened = 0;
		gender = 0;
		gender_open = 0;
		birthday_open = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(int16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint32_t); nSize += strBirthday.length();
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &level, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &class_type, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &head, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &armor, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &weapon, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &side_hand, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &effect, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &pet_tid, sizeof(int16_t)); (*_buf_) += sizeof(int16_t);
		std::memcpy(*_buf_, &profile_opened, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &gender, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &gender_open, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &birthday_open, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		size_t strBirthday_size = strBirthday.length();
		std::memcpy(*_buf_, &strBirthday_size, sizeof(int32_t)); (*_buf_) += sizeof(int32_t);
		std::memcpy(*_buf_, strBirthday.c_str(), strBirthday.length()); (*_buf_) += strBirthday.length();
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&level, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&class_type, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&head, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&armor, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&weapon, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&side_hand, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&effect, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(int16_t) > nSize) { return false; }	std::memcpy(&pet_tid, *_buf_, sizeof(int16_t));	(*_buf_) += sizeof(int16_t); nSize -= sizeof(int16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&profile_opened, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&gender, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&gender_open, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&birthday_open, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(int32_t) > nSize) { return false; }
		uint32_t strBirthday_length = 0; std::memcpy(&strBirthday_length, *_buf_, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(nSize < strBirthday_length) { return false; }
		strBirthday.assign((char*)*_buf_, strBirthday_length); (*_buf_) += strBirthday_length; nSize -= strBirthday_length;
		return true;
	}
}; //SetMainCharacterInfoSyn
struct SetMainCharacterInfoSyn_Serializer {
	static bool Store(char** _buf_, const SetMainCharacterInfoSyn& obj) { return obj.Store(_buf_); }
	static bool Load(SetMainCharacterInfoSyn& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const SetMainCharacterInfoSyn& obj) { return obj.Size(); }
};
struct SetMainCharacterInfoAck {
	enum { MSG_ID = 8012 }; 
	uint32_t	seq;
	int16_t	result;
	SetMainCharacterInfoAck()	{
		seq = 0;
		result = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(int16_t);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &result, sizeof(int16_t)); (*_buf_) += sizeof(int16_t);
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(int16_t) > nSize) { return false; }	std::memcpy(&result, *_buf_, sizeof(int16_t));	(*_buf_) += sizeof(int16_t); nSize -= sizeof(int16_t);
		return true;
	}
}; //SetMainCharacterInfoAck
struct SetMainCharacterInfoAck_Serializer {
	static bool Store(char** _buf_, const SetMainCharacterInfoAck& obj) { return obj.Store(_buf_); }
	static bool Load(SetMainCharacterInfoAck& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const SetMainCharacterInfoAck& obj) { return obj.Size(); }
};
struct GetMainCharacterInfoSyn {
	enum { MSG_ID = 8013 }; 
	uint32_t	seq;
	uint32_t	target_seq;
	GetMainCharacterInfoSyn()	{
		seq = 0;
		target_seq = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &target_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&target_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		return true;
	}
}; //GetMainCharacterInfoSyn
struct GetMainCharacterInfoSyn_Serializer {
	static bool Store(char** _buf_, const GetMainCharacterInfoSyn& obj) { return obj.Store(_buf_); }
	static bool Load(GetMainCharacterInfoSyn& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const GetMainCharacterInfoSyn& obj) { return obj.Size(); }
};
struct GetMainCharacterInfoAck {
	enum { MSG_ID = 8014 }; 
	uint32_t	seq;
	int16_t	result;
	uint32_t	target_seq;
	uint16_t	level;
	uint16_t	class_type;
	uint16_t	head;
	uint16_t	armor;
	uint16_t	weapon;
	uint16_t	side_hand;
	uint16_t	effect;
	int16_t	pet_tid;
	GetMainCharacterInfoAck()	{
		seq = 0;
		result = 0;
		target_seq = 0;
		level = 0;
		class_type = 0;
		head = 0;
		armor = 0;
		weapon = 0;
		side_hand = 0;
		effect = 0;
		pet_tid = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(int16_t);
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(int16_t);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &result, sizeof(int16_t)); (*_buf_) += sizeof(int16_t);
		std::memcpy(*_buf_, &target_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &level, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &class_type, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &head, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &armor, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &weapon, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &side_hand, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &effect, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &pet_tid, sizeof(int16_t)); (*_buf_) += sizeof(int16_t);
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(int16_t) > nSize) { return false; }	std::memcpy(&result, *_buf_, sizeof(int16_t));	(*_buf_) += sizeof(int16_t); nSize -= sizeof(int16_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&target_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&level, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&class_type, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&head, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&armor, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&weapon, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&side_hand, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&effect, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(int16_t) > nSize) { return false; }	std::memcpy(&pet_tid, *_buf_, sizeof(int16_t));	(*_buf_) += sizeof(int16_t); nSize -= sizeof(int16_t);
		return true;
	}
}; //GetMainCharacterInfoAck
struct GetMainCharacterInfoAck_Serializer {
	static bool Store(char** _buf_, const GetMainCharacterInfoAck& obj) { return obj.Store(_buf_); }
	static bool Load(GetMainCharacterInfoAck& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const GetMainCharacterInfoAck& obj) { return obj.Size(); }
};
struct GetMainCharacterInfoSyn_V2 {
	enum { MSG_ID = 8015 }; 
	uint32_t	seq;
	uint32_t	target_seq;
	GetMainCharacterInfoSyn_V2()	{
		seq = 0;
		target_seq = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint32_t);
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &target_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&target_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		return true;
	}
}; //GetMainCharacterInfoSyn_V2
struct GetMainCharacterInfoSyn_V2_Serializer {
	static bool Store(char** _buf_, const GetMainCharacterInfoSyn_V2& obj) { return obj.Store(_buf_); }
	static bool Load(GetMainCharacterInfoSyn_V2& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const GetMainCharacterInfoSyn_V2& obj) { return obj.Size(); }
};
struct GetMainCharacterInfoAck_V2 {
	enum { MSG_ID = 8016 }; 
	uint32_t	seq;
	int16_t	result;
	uint32_t	target_seq;
	uint16_t	level;
	uint16_t	class_type;
	uint16_t	head;
	uint16_t	armor;
	uint16_t	weapon;
	uint16_t	side_hand;
	uint16_t	effect;
	int16_t	pet_tid;
	uint16_t	profile_opened;
	uint16_t	gender;
	uint16_t	gender_open;
	uint16_t	birthday_open;
	std::string	strBirthday;
	GetMainCharacterInfoAck_V2()	{
		seq = 0;
		result = 0;
		target_seq = 0;
		level = 0;
		class_type = 0;
		head = 0;
		armor = 0;
		weapon = 0;
		side_hand = 0;
		effect = 0;
		pet_tid = 0;
		profile_opened = 0;
		gender = 0;
		gender_open = 0;
		birthday_open = 0;
	}
	int32_t Size() const {
		int32_t nSize = 0;
		nSize += sizeof(uint32_t);
		nSize += sizeof(int16_t);
		nSize += sizeof(uint32_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(int16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint16_t);
		nSize += sizeof(uint32_t); nSize += strBirthday.length();
		return nSize;
	}
	bool Store(std::vector<char>& _buf_) const {
		size_t nSize = Size();
 		if(0 == nSize) { return true; }
		if(nSize > _buf_.size()) { 
			_buf_.resize(nSize);
		}
		char* pBuf = &(_buf_[0]);
		if(false == Store(&pBuf)) return false;
		return true;
	}
	bool Store(char** _buf_) const {
		std::memcpy(*_buf_, &seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &result, sizeof(int16_t)); (*_buf_) += sizeof(int16_t);
		std::memcpy(*_buf_, &target_seq, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t);
		std::memcpy(*_buf_, &level, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &class_type, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &head, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &armor, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &weapon, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &side_hand, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &effect, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &pet_tid, sizeof(int16_t)); (*_buf_) += sizeof(int16_t);
		std::memcpy(*_buf_, &profile_opened, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &gender, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &gender_open, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		std::memcpy(*_buf_, &birthday_open, sizeof(uint16_t)); (*_buf_) += sizeof(uint16_t);
		size_t strBirthday_size = strBirthday.length();
		std::memcpy(*_buf_, &strBirthday_size, sizeof(int32_t)); (*_buf_) += sizeof(int32_t);
		std::memcpy(*_buf_, strBirthday.c_str(), strBirthday.length()); (*_buf_) += strBirthday.length();
		return true;
	}
	bool Load(const std::vector<char>& _buf_) {
		size_t nSize = _buf_.size();
 		if(0 == nSize) { return true; }
		const char* pBuf = &(_buf_[0]);
		if(false == Load(&pBuf, nSize)) return false;
		return true;
	}
	bool Load(const char** _buf_, size_t& nSize) {
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(int16_t) > nSize) { return false; }	std::memcpy(&result, *_buf_, sizeof(int16_t));	(*_buf_) += sizeof(int16_t); nSize -= sizeof(int16_t);
		if(sizeof(uint32_t) > nSize) { return false; }	std::memcpy(&target_seq, *_buf_, sizeof(uint32_t));	(*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&level, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&class_type, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&head, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&armor, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&weapon, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&side_hand, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&effect, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(int16_t) > nSize) { return false; }	std::memcpy(&pet_tid, *_buf_, sizeof(int16_t));	(*_buf_) += sizeof(int16_t); nSize -= sizeof(int16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&profile_opened, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&gender, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&gender_open, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(uint16_t) > nSize) { return false; }	std::memcpy(&birthday_open, *_buf_, sizeof(uint16_t));	(*_buf_) += sizeof(uint16_t); nSize -= sizeof(uint16_t);
		if(sizeof(int32_t) > nSize) { return false; }
		uint32_t strBirthday_length = 0; std::memcpy(&strBirthday_length, *_buf_, sizeof(uint32_t)); (*_buf_) += sizeof(uint32_t); nSize -= sizeof(uint32_t);
		if(nSize < strBirthday_length) { return false; }
		strBirthday.assign((char*)*_buf_, strBirthday_length); (*_buf_) += strBirthday_length; nSize -= strBirthday_length;
		return true;
	}
}; //GetMainCharacterInfoAck_V2
struct GetMainCharacterInfoAck_V2_Serializer {
	static bool Store(char** _buf_, const GetMainCharacterInfoAck_V2& obj) { return obj.Store(_buf_); }
	static bool Load(GetMainCharacterInfoAck_V2& obj, const char** _buf_, size_t& nSize) { return obj.Load(_buf_, nSize); }
	static int32_t Size(const GetMainCharacterInfoAck_V2& obj) { return obj.Size(); }
};
#endif // __Location_H__
